package YAVMM::CLI::Plugin::Test;
use Moose::Role;

use Data::Dumper;

sub clusters {
    my $self = shift;

    my $obj = $self->_json_rpc(path => '/json/clusters');

    print join(' ', @{ $obj }), "\n";
}

# sub test {
#     my $self = shift;

#     print STDERR "URI  : ".$self->_uri."\n"   if $self->_debug;
#     print STDERR "Proxy: ".$self->_proxy."\n" if $self->_debug;

#     my $result;
#     $result =  SOAP::Lite
# 	-> uri($self->_uri)
# 	    -> proxy($self->_proxy)
# 		-> test(
# 		    SOAP::Data->name('hash' => {8,6,7,5,3,0,9,2}),
# 		    SOAP::Data->name('guest_name' => 'foo')
# 		  )
# 		    ;

#     use Data::Dumper; print Dumper $self->options;

#     die $result->faultstring."\n" if $result->fault;
#     use Data::Dumper; print Dumper $result->result;

#     $result =  SOAP::Lite
# 	-> uri($self->_uri)
# 	    -> proxy($self->_proxy)
# 		-> test(
# 		    SOAP::Data->name('hash' => {8,6,7,5,3,0,9,2}),
# 		    SOAP::Data->name('guest_name' => 'bar')
# 		  )
# 		    ;
#     die $result->faultstring."\n" if $result->fault;
#     print Dumper $result->result;

#     $result =  SOAP::Lite
# 	-> uri($self->_uri)
# 	    -> proxy($self->_proxy)
# 		-> call('sleep', SOAP::Data->name('time' => 3))
# 		    -> result
# 			;

#     use Data::Dumper; print Dumper $result;

# }

# sub rpc_test {
#     my $self = shift;

#     my $result = $self->_rpc_call(
# 	'test',
# 	hash => { foo => 1, bar => 2, baz => 3 },
# 	name => 'superman',
#     );

#     print Dumper $result;
# }


1;
